import { Navigate, createBrowserRouter } from "react-router-dom";
import Login from "../views/Login/Login";
import All from "../views/All/All";
import Home from "../views/Home/Home";
import Personal from "../views/Personal/Personal";

const router = createBrowserRouter([
    {
        path: "/login",
        element: <Login></Login>
    },
    {
        path: "/all",
        element: <All></All>,
        children: [
            {
                path: "/all/home",
                element: <Home></Home>
            },
            {
                path: "/all/personal",
                element: <Personal></Personal>
            },
            {
                path: "/all/home",
                element: <Navigate to="/all/home"></Navigate>
            }
        ]
    },
    {
        path: "/",
        element: <Navigate to="/all"></Navigate>
    }
])

export default router